package worker;

import java.io.Serializable;
import java.util.ArrayList;

import Task.Map;
import Task.Reduce;

public class Worker implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1960442330569815791L;
	
	protected Map map;
	protected Reduce reduce;
	protected String data;
	protected ArrayList<Worker> workersTacheCourante;
	protected int monRang;
	
	
	public Worker () {
	}	

	
	public ArrayList<Worker> getWorkers() {
		return workersTacheCourante;
	}

	public void pushData( String data ) {
		this.data = data;
	}
	
	public Map getMap() {
		return map;
	}
	
	public Reduce getReduce() {
		return reduce;
	}
	
	public String getData() {
		return data;
	}
	
	public void submit( Map map , Reduce reduce , ArrayList<Worker> workers , int nb ) {
		this.map = map;
		this.reduce = reduce;
		this.workersTacheCourante = workers;
		this.monRang = nb;
	}
	
	
}
